import request from '@/utils/request'

// 查询列表
export function findAllOrders(query) {
    return request({
        url: '/api/orders/list',
        method: 'post',
        data: query
    })
}
// 查询详情
export function getOrders(id) {
    return request({
        url: '/api/orders/' + id,
        method: 'get'
    })
}

// 新增
export function addOrders(data) {
    return request({
        url: '/api/orders/',
        method: 'post',
        data: data
    })
}

// 修改
export function updateOrders(id,data) {
    return request({
        url: '/api/orders/update/'+id,
        method: 'put',
        data: data
    })
}

// 删除
export function delOrders(id) {
    return request({
      url: `/api/orders/${id}/off`,
        method: 'DELETE'
    })
}